<?php

class Main extends Controller {

	function main()
	{
		parent::Controller();
	}
	
	function index()
	{
        $data['title'] = "Crawl Rankings";
        $this->load->view('header', $data);
        
        if (!$this->session->userdata('logged_in'))
        {
            $this->load->helper('url');
            $this->load->view('login_form', $data);
        }
        else
        {
            $data['username'] = $this->session->userdata('username');
            $this->load->view('logged_in', $data);
            $this->load->view('content', $data);
        }
        
        $this->load->view('footer');
        $this->output->enable_profiler(TRUE);
	}
    
    function login()
    {

    }
    
    function logout()
    {
        
    }
}

/* End of file main.php */
/* Location: ./system/application/controllers/main.php */